package com.test1;

/****
 * Volatile非原子性
 */
public class VolatileNoAtomic extends Thread {
	private static volatile int count;

	 
	private static void addCount() {
		for (int i = 0; i < 1000; i++) {
			count++;
		}
		System.out.println(count);
	}

	public void run() {
		addCount();
	}
}
